home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 1⁄5⁄90 / 0309-TTEView in TDialogVi-Jan90 < prev    next >
Encoding:
Text File  |  1990-01-05  |  2.4 KB  |  53 lines  |  [TEXT/GEOL]

  1. Item    5581931                         3-Jan-90        17:00
  2.  
  3. From:   V0230                           Trace, Laurence Kirsh,VAR
  4.  
  5. To:     MOOF                            Rollin, Keith A
  6.         MACAPP.TECH$                    MacApp Technical
  7.  
  8. Sub:    TTEView in TDialogView
  9.  
  10. Keith, et al.
  11.  
  12. First, "TTextEdit" is a misnomer for "TEditText", correct? Assuming this...
  13.  
  14. I, too, have been trying to build a dialog with both a TEditText object and a
  15. TTEView object. It didn't seem as easy as just putting a TTEView into a
  16. TDialogView.
  17.  
  18. My, er, view of the TEditText "problem" is that it works exactly as it should.
  19. The object models the single line text edit control found in dialogs, and such
  20. a control is one line tall and does not wrap the text. So leave it alone.
  21.  
  22. What is needed is a separate TTEView for dialogs. This is problematic because
  23. TTEView is not a sub-class of TControl, and can't be. I suppose someone will
  24. suggest the need for multiple inheritance, but I think the solution used by
  25. TEditText (reference a sub-class of TTEView from a TControl) is a well
  26. structured one. It would appear that we just need to create a new TControl
  27. sub-class which references a TTEView object; but here comes a new problem:
  28. TDialogView gives special treatment to TEditText objects. It saves a single
  29. TDialogTEView and assigns it to the TEditText currently in use. But there is no
  30. easy way to extend this to other controls (say I want multiple TTEView controls
  31. in my dialog).
  32.  
  33. I think this special relationship between TDialogView and TEditText needlessly
  34. complicates additions to the TControl class, and thus to dialogs. I suggest
  35. (perhaps for the 1995 release of MacApp!) that TDialogView's fTEView be
  36. replaced by a list of views called fSharedViews. The _contents_ of this list
  37. would be managed not by TDialogView, but by the various controls which might
  38. need to share object instances (as TEditText does now).
  39.  
  40. For example, when a TEditText is created it would check for a TDialogTEView in
  41. the list, if none were there, it would create one. When the TEditText was
  42. selected by the user, the dialog would tell it, and the TEditText would then
  43. take care of gettting hold of the TDialogTEView from the list.
  44.  
  45. Getting back to your proposed solution, if I just put a TTEView into a
  46. TDialogView, don't I loose all of the behaviour contributed by TControl? (Or is
  47. tabbing the only thing I'd miss?) I expected that I'd have to sub-class
  48. TControl.
  49.  
  50. Thanks,
  51. --John MacVeigh
  52.  
  53.